
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("pure_login_logs", {
        id: {
            type: Sequelize.INTEGER,
            notNull: true,
            primaryKey: true,
            autoIncrement: true
        },
        user_id: {
            type: Sequelize.INTEGER,
            comment:'用户id'
        },
        system:{
            type: Sequelize.STRING,
            comment: '操作系统',
        },
        browser: {
            type: Sequelize.STRING,
            comment:'浏览器',
        },
        ip: {
            type: Sequelize.STRING(100),
            notEmpty: true,
            notNull: true,
            comment: 'IP',
        },
        address:{
            type: Sequelize.STRING,
            comment: '地址',
        },
        status: {
            type: Sequelize.BOOLEAN,
            defaultValue: 1,
            comment: '登录状态 1 成功 0 失败',
        },
        behavior: {
            type: Sequelize.STRING,
            comment:'行为',
        },
    },{
        comment:'登录日志', 
        updatedAt: false,
    });
};
